/*
 * johnson
 *
 */

package com.lxd.pattern.singleton.lazy;

public class LazyThree {
    private static boolean inited = false;


    private LazyThree(){
        if(inited == false){
            inited = !inited;
        }else{
            throw new RuntimeException("非法侵入");
        }
    }

    public static LazyThree getInstance(){
        return LazyThree.LazyHold.INSTANCE;
    }

    private static  class LazyHold{
        public static final LazyThree INSTANCE = new LazyThree();
    }
}
